<!---
/** 
* Copyright 2010 Cristian Costantini - Millemultimedia.it
* License: http://www.gnu.org/licenses/gpl-3.0.html
* @author  Cristian Costantini | cristian@millemultimedia.it
* Version: 1.0.0 Alpha 3
*/
--->
<cfcomponent output="false" extends="fileManager.util.EventManager"
							hint="I'm a FileManager plug-in extension point.">


	<!--- notify --->
	
	<cffunction name="notifyOnFileMoved" access="public" returntype="void">
		<cfset fireEvent( 'onFileMoved', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnFileUploaded" access="public" returntype="void">
		<cfset fireEvent( 'onFileUploaded', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnFileDeleted" access="public" returntype="void">
		<cfset fireEvent( 'onFileDeleted', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnDirectoryRenamed" access="public" returntype="void">
		<cfset fireEvent( 'onDirectoryRenamed', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnDirectoryCreated" access="public" returntype="void">
		<cfset fireEvent( 'onDirectoryCreated', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnFileListed" access="public" returntype="void">
		<cfset fireEvent( 'onFileListed', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnDirectoryListed" access="public" returntype="void">
		<cfset fireEvent( 'onDirectoryListed', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnDirectoryMoved" access="public" returntype="void">
		<cfset fireEvent( 'onDirectoryMoved', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnFileRenamed" access="public" returntype="void">
		<cfset fireEvent( 'onFileRenamed', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnDirectoryDeleted" access="public" returntype="void">
		<cfset fireEvent( 'onDirectoryDeleted', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnFileCopy" access="public" returntype="void">
		<cfset fireEvent( 'onFileCopy', arguments ) />
	</cffunction>
	
	<cffunction name="notifyOnDirectoryCopy" access="public" returntype="void">
		<cfset fireEvent( 'onDirectoryCopy', arguments ) />
	</cffunction>
	
	<!--- before --->
	
	<cffunction name="notifyBeforeFileMove" access="public" returntype="void">
		<cfset fireEvent( 'beforeFileMove', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeFileUpload" access="public" returntype="void">
		<cfset fireEvent( 'beforeFileUpload', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeFileDelete" access="public" returntype="void">
		<cfset fireEvent( 'beforeFileDelete', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeDirectoryRename" access="public" returntype="void">
		<cfset fireEvent( 'beforeDirectoryRename', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeDirectoryCreate" access="public" returntype="void">
		<cfset fireEvent( 'beforeDirectoryCreate', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeFileList" access="public" returntype="void">
		<cfset fireEvent( 'beforeFileList', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeDirectoryList" access="public" returntype="void">
		<cfset fireEvent( 'beforeDirectoryList', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeDirectoryMove" access="public" returntype="void">
		<cfset fireEvent( 'beforeDirectoryMove', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeFileRename" access="public" returntype="void">
		<cfset fireEvent( 'beforeFileRename', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeDirectoryDelete" access="public" returntype="void">
		<cfset fireEvent( 'beforeDirectoryDelete', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeFileCopy" access="public" returntype="void">
		<cfset fireEvent( 'beforeFileCopy', arguments ) />
	</cffunction>
	
	<cffunction name="notifyBeforeDirectoryCopy" access="public" returntype="void">
		<cfset fireEvent( 'beforeDirectoryCopy', arguments ) />
	</cffunction>
	
	<!--- Private --->
	
	<cffunction name="configureEvent" access="private" returntype="void" output="false">
		<cfscript>
		//fileManager
		addEvent( 'onFileMoved' );
		addEvent( 'onFileUploaded' );
		addEvent( 'onFileDeleted' );
		addEvent( 'onDirectoryRenamed' );
		addEvent( 'onDirectoryCreated' );
		addEvent( 'onFileListed' );
		addEvent( 'onDirectoryListed' );
		addEvent( 'onDirectoryMoved' );
		addEvent( 'onFileRenamed' );
		addEvent( 'onDirectoryDeleted' );
		addEvent( 'onFileCopy' );
		addEvent( 'onDirectoryCopy' );
		// before
		addEvent( 'beforeFileMove' );
		addEvent( 'beforeFileUpload' );
		addEvent( 'beforeFileDelete' );
		addEvent( 'beforeDirectoryRename' );
		addEvent( 'beforeDirectoryCreate' );
		addEvent( 'beforeFileList' );
		addEvent( 'beforeDirectoryList' );
		addEvent( 'beforeDirectoryMove' );
		addEvent( 'beforeFileRename' );
		addEvent( 'beforeDirectoryDelete' );
		addEvent( 'beforeFileCopy' );
		addEvent( 'beforeDirectoryCopy' );
		</cfscript>
	</cffunction>

</cfcomponent>